﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>微街秀 > 修改密码</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link type="text/css" rel="stylesheet" href="css/base.css" />
    <link rel="stylesheet" type="text/css" href="css/css.css" />
    <link href="css/password.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script src="js/ajax-data.js" type="text/javascript"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            $("#confirm").click(function () {
                if (!ischeck()) return false;

                ajax.Editpwd("old_pwd=" + $("#oldpwd").val() + "&new_pwd=" + $("#pwd").val(), function (data) {

                    if (data.msg.toString() == "成功") {
                        Alert("修改成功");
                        setTimeout(function () {
                            window.location.href = 'Personal.html';
                        }, 1000);

                    }
                    else
                    { Alert(data.msg.toString()); }
                });
            });

        });

        function ischeck() {

            if ($("#oldpwd").val() == "") {
                Alert("请输入旧密码");
                return false;
            }
            if ($("#pwd").val() == "") {
                Alert("请输入新密码");
                return false;
            }
            if ($("#pwd").val() != $("#comfrompwd").val()) {
                Alert("密码不一致！");
                return false;
            }
              return true;
        }
    </script>
</head>
<body>
    <div class="wamtop">
        <div class="topleft" onclick="window.location.href='Set.html'">
         
                <img src="img/14.png" /> </div>
        <div class="topcententxt">
            修改密码</div>
    </div>
    <div class="box">
        <input type="password" class="input" id="oldpwd" placeholder="旧密码" />
    </div>
    <div class="box">
        <input type="password" class="input" id="pwd" placeholder="新密码" />
    </div>
    <div class="box">
        <input type="password" class="input" id="comfrompwd" placeholder="再次输入新密码" />
    </div>
    <div class="box1" id="confirm">
        <div class="input1">
            确定</div>
    </div>
    <div style="margin-top: 50px;">
    </div>
</body>
</html>
